package net.cloudcodex.client.storyboard.player;

import java.util.List;

import net.cloudcodex.client.storyboard.handler.SceneEventHandler;
import net.cloudcodex.client.storyboard.player.handler.PlayerBoardEventHandler;
import net.cloudcodex.client.storyboard.player.presenter.PlayerBoardPresenter;
import net.cloudcodex.client.storyboard.player.view.PlayerBoardViewImpl;
import net.cloudcodex.client.util.Container;
import net.cloudcodex.shared.dto.campaign.character.CharacterHeaderDTO;
import net.cloudcodex.shared.dto.msg.SceneDTO;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.mvp4g.client.annotation.Debug;
import com.mvp4g.client.annotation.Debug.LogLevel;
import com.mvp4g.client.annotation.Event;
import com.mvp4g.client.annotation.Events;
import com.mvp4g.client.event.EventBus;

/**
 * StoryBoard event bus.
 * 
 * @author ADaroussin
 */
@Debug(logLevel = LogLevel.DETAILED)
@Events(startView = PlayerBoardViewImpl.class, module = PlayerBoardModule.class)
public interface PlayerBoardEventBus extends EventBus {

	@Event(handlers = PlayerBoardEventHandler.class)
	public void newPlayerBoard(long campaignId, long characterId,
			Container<PlayerBoardPresenter> container);

	@Event(handlers = SceneEventHandler.class)
	public void registerToScene(long campaignId, long characterId,
			AsyncCallback<List<SceneDTO>> callback);

	@Event(handlers = SceneEventHandler.class)
	public void checkScene(long campaignId, long characterId);

	@Event(handlers = SceneEventHandler.class)
	public void unregisterToScene(long campaignId, long characterId);

	@Event(forwardToParent = true)
	public void showCharacterDescriptionPopup(long campaignId,
			CharacterHeaderDTO  ownerSelectedCharacterHeaderDTO,
			CharacterHeaderDTO clickedCharacterHeaderDTO);
	
	@Event(forwardToParent = true)
	public void selectCharacterTab(Long id, String characterSheet);

}
